// static/js/scripts.js

document.addEventListener('DOMContentLoaded', function() {
    const form = document.getElementById('queryForm');
    if (form) {
        form.addEventListener('submit', function(event) {
            // 表单验证：至少一个查询条件
            const queryInput = document.getElementById('queryInput');
            if (queryInput && queryInput.value.trim() === "") {
                event.preventDefault();
                alert('请输入仓库名称或 Pusher 进行查询。');
            }
        });
    }
});
